/**
 * 同步修改数据
 */

import * as type from './type'

const mutations = {
    // 赋值 首页信息
    [type.MODIFY_INDEX_INFO](state, actions) {
        state.background = actions.payload.PageShare.BgColor
        document.getElementById('app').style.background = state.background
        state.title = actions.payload.PageShare.Name
        state.pageJson = actions.payload.PageJson
    },
    // 赋值 微页面信息
    [type.MODIFY_STORE_INFO](state, actions) {
        state.background = actions.payload.PageShare.BgColor
        document.getElementById('app').style.background = state.background
        state.title = actions.payload.PageShare.Name
        state.pageJson = actions.payload.PageJson
    }
}

export default mutations